/*
 * @Author: Quinn
 * @Date: 2023-05-13 14:36:43
 * @LastEditors: 叽歪小Q
 * @Description:
 */
import store from "@/store/index";
import quinn from "../utils/quinn";
import pages from "@/views/Pages/index.js";
let menus = [
  ...pages,
  {
    path: "/OrderWarehouse",
    name: "OrderWarehouse",
    meta: { title: "仓库订单列表", icon: "el-icon-s-shop", authority: 298 },
    component: () => import("@/views/Pages/OrderWarehouse.vue"),
  },
  {
    path: "/OrderAftersale",
    name: "OrderAftersale",
    meta: { title: "售后列表", icon: "el-icon-s-marketing", authority: 297 },
    component: () => import("@/views/Pages/OrderAftersale.vue"),
  },
  // {
  // 	path: "/OrderInstall",
  // 	name: "OrderInstall",
  // 	meta: { title: "安装列表", icon: "el-icon-s-shop" },
  // 	component: () => import("@/views/Pages/OrderInstall.vue"),
  // },
  // {
  // 	path: "/OrderFlow",
  // 	name: "OrderFlow",
  // 	meta: { title: "变更记录", icon: "el-icon-s-operation" },
  // 	component: () => import("@/views/Pages/OrderFlow.vue"),
  // },

  {
    path: "/finance",
    meta: { title: "财务管理", icon: "el-icon-s-finance", authority: 188 },
    children: [
      {
        path: "/FinanceTodo",
        name: "FinanceTodo",
        meta: { title: "待处理", authority: 187 },
        component: () => import("@/views/Pages/finance/FinanceTodo.vue"),
      },
      {
        path: "/FinanceDone",
        name: "FinanceDone",
        meta: { title: "已付款", authority: 186 },
        component: () => import("@/views/Pages/finance/FinanceDone.vue"),
      },
      {
        path: "/FinanceRefuse",
        name: "FinanceRefuse",
        meta: { title: "已驳回", authority: 185 },
        component: () => import("@/views/Pages/finance/FinanceRefuse.vue"),
      },
      {
        path: "/FinanceReject",
        name: "FinanceReject",
        meta: { title: "个人驳回列表", authority: 178 },
        component: () => import("@/views/Pages/finance/FinanceReject.vue"),
      },
    ],
  },
  {
    path: "/inventory",
    meta: { title: "库存管理", icon: "el-icon-s-data", authority: 190 },
    children: [
      {
        path: "/ClassifyManage",
        name: "ClassifyManage",
        meta: { title: "套件管理", authority: 198 },
        component: () => import("@/views/Pages/ClassifyManage.vue"),
      },
      {
        path: "/ProductManage",
        name: "ProductManage",
        meta: { title: "材料管理", authority: 197 },
        component: () => import("@/views/Pages/ProductManage.vue"),
      },
      {
        path: "/InventoryWarn",
        name: "InventoryWarn",
        meta: { title: "库存警告" },
        component: () => import("@/views/Pages/InventoryWarn.vue"),
      },
      {
        path: "/InventoryDetail",
        name: "InventoryDetail",
        meta: { title: "库存明细" },
        component: () => import("@/views/Pages/InventoryDetail.vue"),
      },
      {
        path: "/InventoryAdd",
        name: "InventoryAdd",
        meta: { title: "材料入库" },
        component: () => import("@/views/Pages/InventoryAdd.vue"),
      },
      {
        path: "/InventoryRecord",
        name: "InventoryRecord",
        meta: { title: "出入库记录" },
        component: () => import("@/views/Pages/InventoryRecord.vue"),
      },
    ],
  },
];

const routes = [];
menus.forEach((menu) => {
  if (menu.children) {
    menu.children.forEach((item) => routes.push(item));
  } else routes.push(menu);
});
export const menuRoutes = routes;
export default menus;

